package manet.comm;

/**
 * This class contains methods shared by all supported communication
 * protocols.  Includes the ability to send messages (directed or
 * broadcast), listen for messages, or ignore messages.
 * 
 * @author grin0077
 *
 */
public interface Communicator {
	
	/** Send a broadcast message */
	public void sendMessage(String message);
	
	/** Send a message to a specific entity */
	public void sendMessage(String message, String entityName);
	
	/** Check the current listening state */
	public boolean isListening();
	
	/** Toggle the ability to receive messages */
	public void setListeningState(boolean listening);
	
	/** Check if new messages are available */
	public boolean newMessagesAvailable();
	
	/** Grab oldest message from queue */
	public String getQueuedMessage();
}
